<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
 <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>网站信息</title>  
    <link rel="stylesheet" href="css/pintuer.css">
    <link rel="stylesheet" href="css/admin.css">
    <script type="text/javascript" src="js/upload.js"></script>
	
    <script src="js/jquery.js"></script>
    <script src="js/pintuer.js"></script> 
     <script src="js/selectdata.js"></script>
    <script type="text/javascript">
		 $(function(){
			 $("#fileBut").click(function(){
				 $("#file").click(); 
				 })
		     $("#file").change(function(){
			  form1.fileName.value   =form1.file.value; 
			  if(!isExcel()){
				  form1.fileName.value="";
			  }
			  
			 });  
			 $("#submit").click(function(){
				 if($("#academySelect").val()==""){
					 alert("请选择学院");
					 return false;
				 }else if($("#file").val()==""){
					 alert("请选择文件");
					 return false;
				 }else {
					 form1.submit(); 
				 }
				 
			 });
			 });
		
    </script> 
</head>
<body>

 <div class="panel admin-panel">
    <div class="panel-head"><strong><span class="icon-key"></span> 添加课程信息</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="<%=path %>/admin/course_addCourse.action">
      <div class="form-group">
        <div class="label">
          <label for="sitename">学院：</label>
        </div>
        <div class="field">
        <select  id="academySelect"  class="input w50" onchange="changeselect()" style=" line-height:17px; display:inline-block">
           <option value="">请选择学院</option>
          </select>
          <input type="hidden" id="academyName" name="course.academy" />
           <input type="hidden" id="academyId" name="course.academyId" /></div>
      </div>  
      <div class="form-group">
        <div class="label">
          <label for="sitename">班级：</label>
        </div>
        <div class="field">
        <select id="classSelect"  class="input w50" onchange="changeselect1()" style=" line-height:17px; display:inline-block">
            <option value="">请选择班级</option>
          </select>
          <input type="hidden" id="className" name="course.className" />
           <input type="hidden" id="classId" name="course.classId" /></div>
      </div>  
        
           
      <div class="form-group">
        <div class="label">
          <label for="sitename">课程名：</label>
        </div>
        <div class="field">
        
          <input type="text" class="input w50" id="course.course" name="course.course" size="50" value="${pageFinder.dataList[0].course }"  data-validate="required:请输入学院" />       
        </div>
      </div>      
     
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>   
        </div>
      </div>      
    </form>
  </div>
    <div class="padding border-bottom">
       
    </div>
    <table class="table table-hover text-center">
     <tr>
      <th width="10%">学院编号</th>
        <th >课程名</th>
          <th >学院</th>
          <th >班级</th>
        <th width="25%">录入时间</th>
      </tr>
      <volist name="list" id="vo">
      <s:iterator value="#request.pageFinder.dataList" id="stu">
        <tr>
        <td><s:property value="#stu.academyId"/></td>
          <td><font color="#00CC99"><s:property value="#stu.course"/></font></td>
          <td><s:property value="#stu.academy"/></td>
           <td><s:property value="#stu.classId"/></td>
          <td><s:property value="#stu.className"/></td>
          <td><s:property value="#stu.time"/></td>
          </tr>
   		</s:iterator>
   
    </table>
  </div>

</body>
</html>